/*
	File:		LaserSword.h
	Author:		Ben Feldmann
	Purpose:	Class for managing the laser sword weapon
*/

#pragma once

#include "MeleeWeapon.h"
#include "Animation.h"

class Player;

class LaserSword : public MeleeWeapon 
{
public:
	LaserSword(Player* owner);
	~LaserSword();

	bool CheckCollision(IEntity* base);

	void Attack();

	void SpecialAttack();

	virtual void Update(float elapsed);

	virtual void Render();

	virtual RECT GetRect();

	bool IsBerserking() {return berserker;}

	void Berserk();
	
private:
	//bool attacking;
	bool spcAttacking;
	bool spcAttacked;

	bool oneFrame;
	float atkTimer;
	float spcAtkTimer;
	float spcAtkCoolTimer;
	float atkRotation;
	float rotation;

	float prevMoveSpeed;
	float prevAtkSpeed;
	float prevAnimationSpeed;
	float curAtkSpeed;
	float curMoveSpeed;
	float curAnimationSpeed;

	bool berserker;
	int	berserkState;
	float berserkTimer;
	float berserkDuration;


	// Sounds
	int swordAttack1;
	int swordAttack2;
};
